package com.fh.service.dog.impl;


import com.fh.dao.DaoSupport;
import com.fh.entity.Page;
import com.fh.service.dog.CTitleService;
import com.fh.util.PageData;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 标题管理
 */
@Service("CTitleServiceImpl")
public class CTitleServiceImpl  implements CTitleService {

    @Resource(name = "daoSupport")
    private DaoSupport dao;

    /**保存
     * @param pd
     * @throws Exception
     */
    public void save(PageData pd)throws Exception{
        dao.save("CTitleMapper.save", pd);
    }

    public List<PageData> list(Page page) throws Exception {
        return (List<PageData>) dao.findForList("CTitleMapper.datalistPage", page);

    }

    public List<PageData> findlist(PageData pd) throws Exception {
        return (List<PageData>) dao.findForList("CTitleMapper.findlist", pd);
    }

    public PageData findById(PageData pageData) throws Exception {
        return (PageData) dao.findForObject("CTitleMapper.findById", pageData);
    }

    public void update(PageData pageData) throws Exception {
        dao.save("CTitleMapper.update", pageData);
    }

    public List<PageData> findFontAll(PageData pageData) throws Exception {
        return (List<PageData>) dao.findForList("CTitleMapper.findFontAll", pageData);
    }
}
